const path= require('path');
import dotenv from 'dotenv';

let isDev = process.env.NODE_ENV === "development" ? true : false;
//将.env文件加载到process.env中
const dotenvResult = dotenv.config({ path:  isDev?path.resolve(__dirname, '../.env'):path.resolve(__dirname, '.env')  });
if(dotenvResult.error) console.error(dotenvResult.error);

export default {
  PORT: process.env.PORT || 9000,
  MONGODB_URL: process.env.MONGODB_URL || "mongodb://localhost/jaasdsa",
  JWT_SECRET_KEY: process.env.JWT_SECRET_KEY || 'jaasdsa'
};
